package com.nuoniu.sibanyun.common.result;

/**
 * @ClassName ResultStatusCode
 * @Description TODO
 * @Authpr baiqiang
 * @Date 2020/5/12 14:58
 **/
public enum ResultStatusCode {
    OK(200, "OK"),
    HTTP_ERROR_100(100, "1XX错误"),
    HTTP_ERROR_300(300, "3XX错误"),
    HTTP_ERROR_400(400, "4XX错误"),
    HTTP_ERROR_500(500, "5XX错误"),
    SIGN_ERROR(120, "签名错误"),
    TIME_OUT(130, "访问超时"),
    KICK_OUT(300, "您已经在其他地方登录，请重新登录！"),
    BAD_REQUEST(407, "参数解析失败"),
    INVALID_TOKEN(401, "无效的授权码"),
    INVALID_CLIENTID(402, "无效的密钥"),
    REQUEST_FORBIDDEN(403, "没有访问权限"),
    REQUEST_NOT_FOUND(404, "访问地址不存在！"),
    METHOD_NOT_ALLOWED(405, "不支持当前请求方法"),
    REPEAT_REQUEST_NOT_ALLOWED(406, "请求重复提交"),
    SYSTEM_ERR(500, "服务器运行异常"),
    USER_NOT_FOUND(9997,"用户不存在"),
    USER_NEED_REFRESH_VERIFY_CODE(9998,"请刷新图片验证码"),
    USER_NEED_CHECK_VERIFY_CODE(9999,"账户名或者密码输入错误超出限制,请输入图片验证码"),
    USER_ACCOUNT_OR_PWD_ERROR(10000, "账户名或者密码输入错误"),
    USER_ACCOUNT_OR_PWD_EMPTY(10001, "用户名或密码为空"),
    USER_PWD_EXPIRED(10002,"密码过期，请联系管理员!"),
    USER_ACCOUNT_EXPIRED(10003, "账户过期，请联系管理员!"),
    USER_ACCOUNT_LOCKED(10004, "账户被锁定，请联系管理员!"),
    USER_ACCOUNT_DISABLED(10005, "账户被停用，请联系管理员!"),
    USER_LOGINED_IN(10006, "该用户已登录"),
    USER_LOGINING_ERROR(10007, "登录异常"),
    USER_UNAUTHO_ERROR(10401, "您没有该权限"),
    USER_UNAUTHO_FIAL(10500, "您没有该权限"),

    REDIS_ERROR(20001, "redis异常"),
    REDIS_CONNECT_ERROR(20001, "redis连接异常"),
    BIND_PHONE(10010, "请绑定手机号"),
    UPLOAD_ERROR(20000, "上传文件异常"),
    INVALID_CAPTCHA(30005, "无效的验证码"),
    USER_FROZEN(40000, "该用户已被冻结");

    private int code;
    private String msg;

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    ResultStatusCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}


